home *** CD-ROM | disk | FTP | other *** search
/ Young & Modern Digital Makeover Magic / Young & Modern Digital Makeover Magic.iso / data1.cab / TempMKV / TempButtons.js < prev    next >
Encoding:
Text File  |  1999-10-18  |  12.3 KB  |  345 lines

  1. function GetNavButtonHTML (strDir)
  2. {
  3. var strHTML='', varLabel='', varEventID='', varDrvID='', varWidth=' WIDTH=50 ', varHeight= 'HEIGHT=37 ',
  4.     varDisplayIndex='80', varToolTip='', varBackgrnd="file:/Resources/CoreUI|CPanelBkgrnd.PNG" ;
  5.  
  6.     //SpencerP - 7/5/99 : New REPEATING BUTTON...
  7.     var varButtonStyle='';                        //SpencerP - 7/5/99
  8.     var varRepeatDelay='', varInitialDelay='';    //SpencerP - 7/5/99 : default RepeatDay=250, InitialDelay=500
  9.  
  10.     
  11.     switch (strDir)
  12.     {
  13.     case 'left' :
  14.        varWidth       = ' width=30 ' ;
  15.        varHeight      = ' height=30 ' ;
  16.        varEventID     = '0' ;
  17.        varDisplayIndex= '87' ;
  18.        varButtonStyle = 'REPEAT';   //SpencerP - 7/5/99
  19.        varToolTip     = 'Move Left' ;
  20.        break ;
  21.        
  22.     case 'right' :
  23.        varWidth       = ' width=30 ' ;
  24.        varHeight      = ' height=30 ' ;
  25.        varEventID     = '1' ;
  26.        varDisplayIndex= '88' ;
  27.        varButtonStyle = 'REPEAT';   //SpencerP - 7/5/99
  28.        varToolTip     = 'Move Right' ;
  29.        break ;
  30.        
  31.     case 'up' :
  32.        varWidth       = ' width=30 ' ;
  33.        varHeight      = ' height=30 ' ;
  34.        varEventID     = '2' ;
  35.        varDisplayIndex= '89' ;
  36.        varButtonStyle = 'REPEAT';   //SpencerP - 7/5/99
  37.        varToolTip     = 'Move Up' ;
  38.        break ;
  39.        
  40.     case 'down' :
  41.        varWidth       = ' width=30 ' ;
  42.        varHeight      = ' height=30 ' ;
  43.        varEventID     = '3' ;
  44.        varDisplayIndex= '90' ;
  45.        varButtonStyle = 'REPEAT';   //SpencerP - 7/5/99
  46.        varToolTip     = 'Move Down' ;
  47.        break ;
  48.        
  49.     case 'freehand' :
  50.        varWidth       = ' width=32 ' ;
  51.        varHeight      = ' height=32 ' ;
  52. //       varLabel   = 'FH' ;
  53.        varDisplayIndex= '147' ;
  54.        varEventID = '4' ;
  55.        varToolTip = 'Turn on and off sizing handles to resize and rotate' ; //todo
  56.        break ;
  57.        
  58.     case 'ccw' :
  59.        varWidth       = ' width=30 ' ;
  60.        varHeight      = ' height=30 ' ;
  61.        varEventID     = '5' ;
  62.        varDisplayIndex= '91' ;
  63.        varButtonStyle = 'REPEAT';   //SpencerP - 7/5/99
  64.        varToolTip     = 'Rotate left' ;
  65.        break ;
  66.        
  67.     case 'cw' :
  68.        varWidth       = ' width=30 ' ;
  69.        varHeight      = ' height=30 ' ;
  70.        varEventID     = '6' ;
  71.        varDisplayIndex= '92' ;
  72.        varButtonStyle = 'REPEAT';   //SpencerP - 7/5/99
  73.        varToolTip     = 'Rotate right' ;
  74.        break ;
  75.        
  76.     case 'smaller' :
  77.        varWidth       = ' width=30 ' ;
  78.        varHeight      = ' height=30 ' ;
  79.        varEventID     = '7' ;
  80.        varDisplayIndex= '94' ;
  81.        varButtonStyle = 'REPEAT';   //SpencerP - 7/5/99
  82.        varToolTip     = 'Decrease size' ;
  83.        break ;
  84.        
  85.     case 'larger' :
  86.        varWidth       = ' width=30 ' ;
  87.        varHeight      = ' height=30 ' ;
  88.        varEventID     = '8' ;
  89.        varDisplayIndex= '93' ;
  90.        varButtonStyle = 'REPEAT';   //SpencerP - 7/5/99
  91.        varToolTip     = 'Increase size' ;
  92.        break ;
  93.        
  94.     case 'picker' :
  95.        varWidth       = ' width=25 ' ;
  96.        varHeight      = ' height=45 ' ;
  97.        varEventID     = '9' ;
  98.        varDisplayIndex= '113' ;
  99.        varToolTip     = 'Color sampler to select color from the picture' ;
  100.        break ;
  101.        
  102.     case 'smudge' :
  103.        varWidth       = ' width=85 ' ;
  104.        varHeight      = ' height=50 ' ;
  105.        varEventID     = '10' ;
  106.        varDisplayIndex= '112' ;
  107.        varToolTip     = 'Sponge to blend makeup' ;
  108.        break ;
  109.        
  110.     case 'towel' :
  111.        varWidth       = ' width=80 ' ;
  112.        varHeight      = ' height=70 ' ;
  113.        varEventID     = '11' ;
  114.        varDisplayIndex= '56' ;
  115.        varDrvID       = 'CommandDispatcher,Active,5016' ;
  116.        varToolTip     = 'Tissue to remove makeup' ;
  117.        break ;
  118.        
  119.     case 'remove' :
  120.        varLabel   = 'Remove' ;
  121.        varWidth   = ' width=80 ' ;
  122.        varEventID = '12' ;
  123.        varDrvID   = 'CommandDispatcher,Active,5016' ;
  124.        varToolTip = 'Tissue to remove makeup' ;
  125.        break ;
  126.        
  127.     case 'delete' :  // used only in the layout views
  128.        varLabel   = 'Remove' ;
  129.        varWidth   = ' width=80 ' ;
  130.        varEventID = '13' ;
  131.        varToolTip = 'Remove Item' ;
  132.        break ;
  133.  
  134.     case 'close' :
  135.        varLabel   = 'Close' ;
  136.        varWidth   = ' width=90 ' ;
  137.        varEventID = '100' ;
  138.        break ;
  139.  
  140.     case 'main' :
  141.        varDisplayIndex= '133' ;
  142.        varWidth       = ' width=169 ' ;
  143.        varHeight      = ' height=100 ' ;
  144.        varEventID     = '100' ;
  145.        varToolTip     = 'Return to main screen' ;
  146.        break ;
  147.  
  148.     case 'obj_down' :
  149.        varLabel   = 'Back' ;
  150.        varWidth   = ' width=80 ' ;
  151.        varDrvID   = 'CommandDispatcher,Active,20107,0' ;
  152.        varToolTip = 'Move accessory back' ;
  153.        break ;
  154.  
  155.     case 'obj_up' :
  156.        varLabel   = 'Forward' ;
  157.        varWidth   = ' width=80 ' ;
  158.        varDrvID   = 'CommandDispatcher,Active,20106,0' ;
  159.        varToolTip = 'Move accessory forward' ;
  160.        break ;
  161.  
  162.     default :
  163.        break ;
  164.     }
  165.  
  166.     strHTML =  "<OBJECT ID='TempButton'" + varWidth + varHeight ;
  167.     strHTML += "< CLASSID='CLSID:4FA211A0-FD53-11d2-ACB6-0080C877D9B9'>" ;
  168.     strHTML += "<PARAM NAME='DisplayID' VALUE='file:/Resources/WorkflowsComponent|Common|stdgui.wkf'>" ;
  169.     strHTML += "<PARAM NAME='DisplayStep' VALUE=50>" ;
  170.  
  171.     // SpencerP - Button Style
  172.     if (varButtonStyle != '')
  173.     {
  174.        strHTML += "<PARAM NAME='ButtonStyle' VALUE='" + varButtonStyle + "'>" ;
  175.  
  176.        if (varRepeatDelay != '')      // If custom delay time, ...
  177.        {
  178.           strHTML += "<PARAM NAME='ButtonRepeatDelay' VALUE='" + varRepeatDelay + "'>" ;
  179.           strHTML += "<PARAM NAME='ButtonInitialDelay' VALUE='" + varInitialDely + "'>" ;
  180.        }
  181.     }
  182.  
  183.     strHTML += "<PARAM NAME='NumStates' VALUE=4>" ;
  184.  
  185.     if (varDrvID == '')
  186.        strHTML += "<PARAM NAME='EventID' VALUE=" + varEventID + ">" ;
  187.     else
  188.     {
  189.        strHTML += "<PARAM NAME='DriverID' VALUE='" + varDrvID + "'>" ;
  190.        if (varEventID == '')
  191.           varEventID = 52347 ; // magic
  192.        strHTML += "<PARAM NAME='EventID' VALUE=" + varEventID + ">" ;
  193.     }
  194.  
  195.     if (varLabel != '')
  196.     {
  197.        strHTML += "<PARAM NAME='Label' VALUE='" + varLabel + "'>" ;
  198.        if (varDisplayIndex != '80')
  199.        {
  200.          strHTML += "<PARAM NAME='LabelColor' VALUE='255,255,255'>" ;
  201.          strHTML += "<PARAM NAME='DisplayIndex' VALUE=" + varDisplayIndex + ">" ;
  202.          strHTML += "<PARAM NAME='ButtonStyle' VALUE='FIXED'>" ;
  203.        }
  204.        else
  205.           strHTML += "<PARAM NAME='DisplayIndex' VALUE=80>" ;
  206.     }
  207.     else
  208.     {
  209.        strHTML += "<PARAM NAME='Label' VALUE=''>" ;
  210.        strHTML += "<PARAM NAME='DisplayIndex' VALUE=" + varDisplayIndex + ">" ;
  211.        strHTML += "<PARAM NAME='ButtonStyle' VALUE='FIXED'>" ;
  212.     }
  213.  
  214.     strHTML += "<PARAM NAME='ToolTipString' VALUE='" + varToolTip + "'>" ;
  215.     strHTML += "<PARAM NAME='BackgroundMoniker' VALUE='file:/" + top.gstrThemePath + top.gstrMenuImage + "'>>" ;
  216.  
  217.     strHTML += "</OBJECT>" ;  
  218.    
  219.     return strHTML ;
  220. }
  221.  
  222. /*
  223.  * Used when the Accessories pages are in use
  224.  */
  225. function GetAccNavButtonHTML (strDir)
  226. {
  227. var strHTML='', varLabel='', varEventID='', varDriverID='', varDisplayIdx='80', varTooltip='' ;
  228.  
  229.     switch (strDir)
  230.     {
  231.     case 'eyewear' :
  232.        varEventID   = '0' ;
  233.        varDriverID  = 'file:/Resources/WorkflowsComponent|Props|MakeOverProps.wkf,60,0' ;
  234.        varDisplayIdx= 103 ;
  235.        varTooltip   = 'Try on eyewear' ;
  236.        break ;
  237.        
  238.     case 'headgear' :
  239.        varEventID   = '1' ;
  240.        varDriverID  = 'file:/Resources/WorkflowsComponent|Props|MakeOverProps.wkf,60,1' ;
  241.        varDisplayIdx= 104 ;
  242.        varTooltip   = 'Try on hats' ;
  243.        break ;
  244.        
  245.     case 'jewelry' :
  246.        varEventID   = '2' ;
  247.        varDriverID  = 'file:/Resources/WorkflowsComponent|Props|MakeOverProps.wkf,60,2' ;
  248.        varDisplayIdx= 105 ;
  249.        varTooltip   = 'Try on jewelry, hair accents and piercings' ;
  250.        break ;
  251.        
  252.     case 'tattoos' :
  253.        varEventID   = '3' ;
  254.        varDriverID  = 'file:/Resources/WorkflowsComponent|Props|MakeOverProps.wkf,60,3' ;
  255.        varDisplayIdx= 106 ;
  256.        varTooltip   = 'Try on tattoos' ;
  257.        break ;
  258.  
  259.     case 'help' :
  260.        varEventID   = '5' ;
  261.        varDisplayIdx= '45';
  262.        varTooltip   = 'Online help' ;
  263.        break ;
  264.        
  265.     default :
  266.        return strHTML = "" ;
  267.     }
  268.  
  269.     strHTML =  "<OBJECT ID='AccessoryButton' WIDTH=76 HEIGHT=56 ALIGN=Top" ;
  270.     strHTML += "< CLASSID='CLSID:4FA211A0-FD53-11d2-ACB6-0080C877D9B9'>" ;
  271.     strHTML += "<PARAM NAME='DisplayID' VALUE='file:/Resources/WorkflowsComponent|Common|stdgui.wkf'>" ;
  272.     strHTML += "<PARAM NAME='DisplayStep' VALUE=50>" ;
  273.     strHTML += "<PARAM NAME='NumStates' VALUE=4>" ;
  274.     strHTML += "<PARAM NAME='DisplayIndex' VALUE='" + varDisplayIdx + "'>" ;
  275.     strHTML += "<PARAM NAME='EventID' VALUE=" + varEventID + ">" ;
  276.     strHTML += "<PARAM NAME='Label' VALUE='" + varLabel + "'>" ;
  277.     strHTML += "<PARAM NAME='ToolTipString' VALUE='" + varTooltip + "'>" ;
  278.  
  279.     if (strDir != 'help')
  280.     {
  281.       strHTML += "<PARAM NAME='DriverID' VALUE='" + varDriverID + "'>" ;
  282.       strHTML += "<PARAM NAME='ButtonStyle' VALUE='RADIO'>" ;
  283.       strHTML += "<PARAM NAME='StateDriverID' VALUE='file:/Resources/WorkflowsComponent|Props|MakeOverProps.wkf'>" ;
  284.       strHTML += "<PARAM NAME='StateDriverStep' VALUE=60>" ;
  285.     }
  286.     strHTML += "<PARAM NAME='HelpContext' VALUE='Photos.chm,600'>" ;
  287.     strHTML += "<PARAM NAME='BackgroundMoniker' VALUE='file:/Resources/Decor/navbar_acc.PNG'>>" ;
  288.     strHTML += "</OBJECT>" ;
  289.    
  290.     return strHTML ;
  291. }
  292.  
  293. function GetMyColorsButtonHTML ()
  294. {
  295. var strHTML = "" ;
  296.  
  297.     strHTML += "<OBJECT ID='MyColorButton' WIDTH=145 HEIGHT=40 ALIGN=Top" ;
  298.     strHTML += "< CLASSID='CLSID:4FA211A0-FD53-11d2-ACB6-0080C877D9B9'>" ;
  299.     strHTML += "<PARAM NAME='DisplayID' VALUE='file:/Resources/WorkflowsComponent|Common|stdgui.wkf'>" ;
  300.     strHTML += "<PARAM NAME='DisplayStep' VALUE=50>" ;
  301.     strHTML += "<PARAM NAME='DisplayIndex' VALUE=80>" ;
  302.     strHTML += "<PARAM NAME='NumStates' VALUE=4>" ;
  303.     strHTML += "<PARAM NAME='Label' VALUE='Add to My Colors'>" ;
  304.     strHTML += "<PARAM NAME='EventID' VALUE=0>" ;
  305.     strHTML += "<PARAM NAME='VJustification' VALUE='bottom'>" ;
  306.     strHTML += "<PARAM NAME='ToolTipString' VALUE='Add current color to My Colors palette'>" ;
  307.     strHTML += "<PARAM NAME='BackgroundMoniker' VALUE='file:/Resources/Decor/Panel_Mkv.PNG'>>" ;
  308.     strHTML += "</OBJECT>" ;
  309.    
  310.     return strHTML ;
  311. }
  312.  
  313. function GetTweezerButtonsHTML ()
  314. {
  315. var strHTML = "" ;
  316.  
  317.     strHTML += "<OBJECT ID='TweezerButton' WIDTH=150 HEIGHT=36 ALIGN=Top" ;
  318.     strHTML += "< CLASSID='CLSID:4FA211A0-FD53-11d2-ACB6-0080C877D9B9'>" ;
  319.     strHTML += "<PARAM NAME='DisplayID' VALUE='file:/Resources/WorkflowsComponent|Common|stdgui.wkf'>" ;
  320.     strHTML += "<PARAM NAME='DisplayStep' VALUE=50>" ;
  321.     strHTML += "<PARAM NAME='DisplayIndex' VALUE=80>" ;
  322.     strHTML += "<PARAM NAME='NumStates' VALUE=4>" ;
  323.     strHTML += "<PARAM NAME='Label' VALUE='Tweeze from above'>" ;
  324.     strHTML += "<PARAM NAME='EventID' VALUE=0>" ;
  325.     strHTML += "<PARAM NAME='DriverID' VALUE='CommandDispatcher,Active,5005,5,0'>" ;
  326.     strHTML += "<PARAM NAME='ToolTipString' VALUE='Tweeze brows from above'>" ;
  327.     strHTML += "<PARAM NAME='BackgroundMoniker' VALUE='file:/Resources/Decor/Panel_Mkv.PNG'>>" ;
  328.     strHTML += "</OBJECT>" ;
  329.  
  330.     strHTML += "<OBJECT ID='TweezerButton' WIDTH=150 HEIGHT=36 ALIGN=Top" ;
  331.     strHTML += "< CLASSID='CLSID:4FA211A0-FD53-11d2-ACB6-0080C877D9B9'>" ;
  332.     strHTML += "<PARAM NAME='DisplayID' VALUE='file:/Resources/WorkflowsComponent|Common|stdgui.wkf'>" ;
  333.     strHTML += "<PARAM NAME='DisplayStep' VALUE=50>" ;
  334.     strHTML += "<PARAM NAME='DisplayIndex' VALUE=80>" ;
  335.     strHTML += "<PARAM NAME='NumStates' VALUE=4>" ;
  336.     strHTML += "<PARAM NAME='Label' VALUE='Tweeze from below'>" ;
  337.     strHTML += "<PARAM NAME='EventID' VALUE=1>" ;
  338.     strHTML += "<PARAM NAME='DriverID' VALUE='CommandDispatcher,Active,5005,4294967291,0'>" ;
  339.     strHTML += "<PARAM NAME='ToolTipString' VALUE='Tweeze brows from below'>" ;
  340.     strHTML += "<PARAM NAME='BackgroundMoniker' VALUE='file:/Resources/Decor/Panel_Mkv.PNG'>>" ;
  341.     strHTML += "</OBJECT>" ;
  342.    
  343.     return strHTML ;
  344. }
  345.